package com.neusoft.elmboot.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.neusoft.elmboot.mapper.CreditMapper;
import com.neusoft.elmboot.mapper.UserCartMapper;
import com.neusoft.elmboot.po.Business;
import com.neusoft.elmboot.po.Credit;
import com.neusoft.elmboot.po.UserCart;
import com.neusoft.elmboot.service.CreditService;
import com.neusoft.elmboot.util.CommonUtil;

@Service
public class CreditServiceImpl implements CreditService{
	@Autowired
	 private CreditMapper creditMapper;
	
	@Override
	 public int addByUserId(Credit credit) {
		credit.setCreate_time(CommonUtil.getCurrentDate());
		 return creditMapper.addByUserId(credit);
	 }
	
	@Override
	 public Credit getByUserId(Credit credit) {
	 return creditMapper.getByUserId(credit);
	 }
	
	@Override
	 public List<Credit> listByUserId(Credit credit){
		 return creditMapper.listByUserId(credit);
	 }

}
